/**
 * Created by Administrator on 2017/2/14.
 */

import React, {Component, PropTypes} from 'react';
import {login} from '../../scripts/login'

export default class Login extends Component {
    componentDidMount() {

        $('.loginBtn').click(function(){

            var account=$('input[name="account"]').val();
            var passwd=$('input[name="passwd"]').val();

            login(account,passwd)
        })
    }

    render(){
        return <div className="loginContainer">
            <div className="loginHeader">
                <h1>登录</h1>
            </div>
            <section className="login">
                <input  placeholder="请输入手机号" type="tel" name="account"/>
                <input  placeholder="请输入6-20位的密码" type="password" name="passwd"/>
                <button className="loginBtn">立即登录</button>
            </section>

        </div>
    }
}

